package com.pactera.integral.dao;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.pactera.integral.entity.AdditionalScore;

@Repository("additionalScoreDao")
public interface AdditionalScoreDao  extends CommonRepository<AdditionalScore, String>{

	AdditionalScore findByCode(String code);
	
	 @Transactional
	 @Modifying
	 @Query(value = "delete from int_additional_score where additional_score_id =:additionalScoreId ", nativeQuery = true)
	 Integer deleteAdditionalScore(@Param("additionalScoreId")String additionalScoreId);

	 AdditionalScore findByIdAndCode(String id, String code);
	 
	 AdditionalScore findById(String id);
}
